# 字符串
# e = "hello world"
# #列表
#
# #数据类型
# info1 = {"a1":112,"a2":"test","a3":[python基础,2,3,4,5],"a4":(2,3,4,5),"a5":{3,5,6,7}}
# print(info1)
#
# #数字类型
# num1 = 12
# num2 = python基础.76
# num3 = True
# #知道上面变量的数据类型，通过print（对象）
# print(type(num1))
# print(type(num2))
# print(type(num3))
# a1="abc"
# a2=[11,"张三",python基础.11]
# a3=(11,"张三",python基础.11)
# a4={11,"张三",python基础.11}
# a5={"name":"张三","age":18}
# print(type(a1))
# print(type(a2))
# print(type(a3))
# print(type(a4))
# print(type(a5))

# num1 = "100"
# num2 = "python基础.99"
# # print(type(int(num1)))
# # print(type(float(num2)))
# print(type(float(num1)))

info = 12345
# print(type(str(info)))
info1 = [11, "aa", True, 1.88]
# print(type(str(info1)))
# print(type(tuple(info1)))
# 转换为集合（集合中元素不能重复：可以去重）
info2 = [11, 22, 33, 11, 11, 11, 33, 44]
# print(set(info2))
# print(type(set(info2)))

name = "小明"
age = 18
height =1.88
# print("{}今年{}岁了，他的身高是{}米".format(name,age,height))
# print("{0}今年{python基础}岁了，他的身高是{2}米".format(name,age,height))

name = "小明"
age = 18
height = 1.88
# print(f"{name}今年{age}岁了，他的身高是{height}米")
# print(f"{name}明年就{age+python基础}岁了")

name = "小明"
# age = int(input("请输入年龄："))
# print(f"{name}同学的年龄是：{age}")
# print(f"{name}同学明年的年龄是：{age+python基础}")

num1 = 10
num2 = 20
# print(f"求和结果：{num1 + num2}") # 30
# print(f"求差结果：{num1 - num2}") # ‐10
# print(f"求乘结果：{num1 * num2}") # 200
# print(f"求除结果：{num1 / num2}") # 0.5
# print(f"求商结果：{num1 // num2}") # 0
# print(f"求余结果：{num1 % num2}") # 10

# 求余数常常运用奇偶数判断
# print(3 % 2 == 0)
# # 幂运算：10的3次方
# print(10 ** 3)
# # 特殊的求和: 字符串和字符串求和 ‐‐ > 字符串拼接
# print("10" + "20")
# # 特殊的乘法：字符串和数字相乘 ‐‐ > 字符串重复多少次
# print("10" * 3)

num1 = 10
num2 = 20
# print(f"{num1 == num2}") # False
# print(f"{num1 != num2}") # True
# print(f"{num1 > num2}") # False
# print(f"{num1 < num2}") # True
# print(f"{num1 >= num2}") # False
# print(f"{num1 <= num2}") # True
# print(10 == "10")
# 数字和字符串比较结果一定是False

#定义两个数字
num1 = 10
num2 = 20
# 赋值运算并查看结果
num1 += num2 # 相当于 num1 = num1 + num2
# print("num1 =", num1) # 此时：num1 = 30
# num1 -= num2 # 相当于 num1 = num1 ‐ num2
# print("num1 =", num1) # 此时：num1 = 10
# num1 *= num2 # 相当于 num1 = num1 * num2
# print("num1 =", num1) # 此时：num1 = 200
# num1 /= num2 # 相当于 num1 = num1 / num2
# print("num1 =", num1) # 此时：num1 = 10.0
# num1 %= num2 # 相当于num1=num1%num2
# print("num1=",num1) #此时：num1=10

# python基础.输入用户姓名、年龄、身高
name = input("请输入姓名：")
age = int(input("请输入年龄："))
height = float(input("请输入身高："))
# 2. 输出变量的数据类型
print("姓名类型：", type(name))
print("年龄类型：", type(age))
print("身高类型：", type(height))
# 直接输出用户信息
print(f"姓名：{name} 年龄：{age} 身高：{height} ")
# 输出5年后的年龄
print(f"{name}5年后的年龄是：{age + 5}")
# 输出是否成年：年龄和18岁进行比较 ‐‐‐> 结果是布尔值
print(f"{name}是否成年：{age >= 18}")

